package com.green.aop.advice;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

@Aspect
//@Component
public class ExceptionAdvice {


    @AfterThrowing(pointcut = "execution(* com.green.aop.service.IUserService.*(..))")
    public void exceptionAdvice() {
        System.out.println("方法出现异常了");
    }
}
